package com.example.sunnyweather.db;

import java.util.Objects;

public class Province {

    private Integer id;
    private String provinceName;
    private Integer provinceCode;

    public Province() {

    }

    public Province(Integer id, String provinceName, Integer provinceCode) {
        this.id = id;
        this.provinceName = provinceName;
        this.provinceCode = provinceCode;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public Integer getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(Integer provinceCode) {
        this.provinceCode = provinceCode;
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getProvinceName(), getProvinceCode());
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Province)) return false;
        Province province = (Province) o;
        return getId().equals(province.getId()) &&
                getProvinceName().equals(province.getProvinceName()) &&
                getProvinceCode().equals(province.getProvinceCode());
    }

    @Override
    public String toString() {
        return "Province{" +
                "id=" + id +
                ", provinceName='" + provinceName + '\'' +
                ", provinceCode=" + provinceCode +
                '}';
    }
}
